﻿using FB.Providers.EmployeeInfo;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

//namespace FB.Membership.Principal
namespace FB.Data.Models
{
    [Serializable]
    public class EmployeeInfoBase
    {
        public string FullName
        {
            get
            {
                var n = string.Format("{0} {1} {2}", LastName, FirstName, Alias);
                return (!string.IsNullOrEmpty(ChineseName)) ?
                    string.Format("{0} ({1})", n, ChineseName)
                    : n;
            }
        }

        public string EMPCode { get; set; }
        public string RefCode { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public string ChineseName { get; set; }
        public string Alias { get; set; }

        public Company Company { get; set; }
        public Department Department { get; set; }
        public Team Team { get; set; }
        public List<Position> Positions { get; set; }
    }

    [Serializable]
    public class EmployeeInfo : EmployeeInfoBase
    {
        public List<EmployeeInfoBase> Subordinates { get; set; }
        public List<EmployeeInfoBase> Supervisors { get; set; }

    }
}
